As computer systems have advanced, graphics processing units (GPUs) have become increasingly advanced both in complexity and computing power. GPUs handle processing of increasingly large and complex graphics. GPUs are increasingly used to perform post-processing to add visual effects to create more realistic and accurate images.
Conventional GPUs first perform multi-sample anti-aliasing (MSAA) resolve and then post-processing on a rendered image before outputting the image. Post-processing is one or more processes applied after rendering which attempts to simulate various visual effects. Unfortunately, information is lost when MSAA resolve is performed. For example, on edges of an object, the MSAA resolve process blends together samples from near and far surfaces into one pixel thereby removing near and far surface information. Conventional solutions apply post-processing after MSAA resolve and post-processing can therefore not be applied to the samples of each pixel thereby resulting in post-processing not being applied to correctly simulate the intended visual effects. For example, background samples may need an out-of-focus blur while foreground samples might need to be sharp and in focus. In such a case, the post-processing results in removing anti-aliasing on edges in which the post-processing is different for background and foreground samples.
MSAA resolve is usually performed with a box filter that takes the average of all of the samples in a pixel. This box filter works as intended when using color that is in a low-dynamic-range perceptual color-space. However, correct post-processing requires an HDR linear color-space. Often graphics engines need to compromise on performance and resolve two surfaces, once in LDR perceptual color-space for anti-aliasing, and again in an HDR linear color-space for post-processing. Further, in cases where a box filter is used to perform MSAA resolve, the box filter provides relatively poor filtering quality.